There have been three major improvements in guns over the following centuries. The first was the development of increasingly effective methods of igniting the charge that propelled the projectile. The second was rifling, spiraling grooves along the barrel of the gun that spins the bullet and makes it fly straight. The third was the development of breech loading, which meant the gun could be loaded from the back instead of from the front.
Today bullets are attached to metal cartridges filled with explosive and backed by a primer (a small cap of a chemical that explodes when struck). When a pin strikes the primer, the chemical explodes, igniting the main charge and propelling the bullet through the barrel.